@isTest
private class OverdueExcessHandlerTest {
    static testMethod void testMethod1() {

      
    	Id engProfile = [Select Id From Profile Where Name ='销售部直销销售员'].Id;
        User u1 = new User( Alias = 'samLdc1', 
                         Email = 'ldc@test.com.maike',
                         Emailencodingkey = 'UTF-8', 
                         Lastname = '用户1', 
                         Languagelocalekey = 'en_US',
                         Localesidkey = 'en_US', 
                         Profileid = engProfile, 
                         Country = 'United States',
                         IsActive = true,
                         CompanyName='Y-MKSY',
                         FederationIdentifier = '222',
                         SubCompany__c='四川省迈克实业有限公司',
                         Province__c='四川省',
                         UserDepartment__c='客户服务中心(工程部)',
                         Timezonesidkey = 'America/Los_Angeles', 
                         EmployeeNumber = '000222',
                         Username = 'Matldc1@test.com.maike' 
                        );
       insert u1;
       
       //创建收款明细
       SalesReceiptDetail__c s = new SalesReceiptDetail__c();
       s.ywy_number__c = '000222';
       s.corp_name__c = '迈克实业';
       s.bbje__c = 100000;
       s.doc_date__c = System.today().addMonths(-1);
       s.custcode__c = 'TEST01';
       
       insert s;

       Account acc = TestUtils.createAccount();
		acc.Level__c = '一级医院';
		acc.AccountNumber = 'TEST01';
		insert acc;

		OverdueExcess__c od = new OverdueExcess__c();
		od.Company__c = '迈克实业';
		od.CustomerName__c = acc.Id;
		insert od;
    

    //OverdueExcessHandler.getLastMonthMoney(null);



        
    }
}